//
//  AcceptDealDetailViewController.m
//  TeamInformatization
//
//  Created by bigger on 2019/4/6.
//  Copyright © 2019年 SPIC. All rights reserved.
//

#import "AcceptDealDetailViewController.h"
#import "WorkQuestionView.h"

@interface AcceptDealDetailViewController ()

@end

@implementation AcceptDealDetailViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self showTitleBarWithTitle:@"处理验收" leftButtonStyle:Base_NavigationBar_Back rightButtonStyle:Base_NavigationBar_None];
    
    // UI
    [self loadShowViews];
    
    // Do any additional setup after loading the view.
}

- (void)loadShowViews
{
    UIScrollView * bgScrollView = [[UIScrollView alloc] init];
    bgScrollView.backgroundColor = kCommonBGGaryColor;
    bgScrollView.bounces = NO;
    bgScrollView.showsVerticalScrollIndicator = NO;
    bgScrollView.userInteractionEnabled = YES;
    bgScrollView.contentSize = CGSizeMake(kScreenWidth, kScreenHeight * 2);
    [self.view addSubview:bgScrollView];
    [bgScrollView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(kSafeAreaTopHeight);
        make.left.right.mas_equalTo(0);
        make.bottom.mas_equalTo(0);
    }];
    
    
    WorkQuestionView *workQuestionView = [[WorkQuestionView alloc] initWithShowType:4];
    [workQuestionView setShowDataWithText:@"上大街上看到好卡时间段看见爱上就肯定会撒娇客户端啥东东花开的时候"];
    [bgScrollView addSubview:workQuestionView];
    [workQuestionView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(0);
        make.centerX.mas_equalTo(bgScrollView);
        make.width.mas_equalTo(kScreenWidth);
    }];
    
    WorkQuestionView *workDealView = [[WorkQuestionView alloc] initWithShowType:3];
    [workDealView setShowDataWithText:@"上大街上看到好卡时间段看见爱上就肯定会撒娇客户端啥东东花开的时候上大街上看到好卡时间段看见爱上就肯定会撒娇客户端啥东东花开的时候上大街上看到好卡时间段看见爱上就肯定会撒娇客户端啥东东花开的时候上大街上看到好卡时间段看见爱上就肯定会撒娇客户端啥东东花开的时候上大街上看到好卡时间段看见爱上就肯定会撒娇客户端啥东东花开的时候"];
    [bgScrollView addSubview:workDealView];
    [workDealView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(workQuestionView.mas_bottom).offset(10 * kScaleWidth);
        make.centerX.mas_equalTo(bgScrollView);
        make.width.mas_equalTo(kScreenWidth);
    }];
    
    NSArray *textArr = @[@"确认通过", @"重新修改"];
    float btnwidth = (kScreenWidth - 45 * kScaleWidth) / 2.;
    for (int i = 0; i < 2; i++) {
        UIButton *AcceptDealButton = [UIButton buttonWithType:UIButtonTypeCustom];
        [AcceptDealButton setCommonStyleAndShowText:textArr[i]];
        [AcceptDealButton addTarget:self action:@selector(AcceptDealAction:) forControlEvents:UIControlEventTouchUpInside];
        [bgScrollView addSubview:AcceptDealButton];
        [AcceptDealButton mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.mas_equalTo(workDealView.mas_bottom).offset(30 * kScaleWidth);
            make.bottom.mas_equalTo(-25 * kScaleWidth);
            make.left.mas_equalTo(15 * kScaleWidth + (btnwidth + 15 * kScaleWidth) * i);
            make.size.mas_equalTo(CGSizeMake(btnwidth, 44 * kScaleWidth));
        }];
    }
    
    
}

// 确认处理情况
- (void)AcceptDealAction:(UIButton *)sender
{
    
    
}


#pragma -导航栏 两边按钮操作
-(void)baseNavigationBarLeftButtonClick:(UIButton *)button
{
    [self.navigationController popViewControllerAnimated:YES];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
